import request from "@/utils/request";

// 统一导出所有API接口
export * from "./auth";
export * from "./posts";
export * from "./comments";
export * from "./user";
// 后续添加更多API模块时在此处导出

// ==================== 首页相关 ====================

/**
 * 获取平台统计信息
 */
export function getPlatformStats() {
  return request({
    url: "/public/stats",
    method: "get",
  });
}

/**
 * 获取最新帖子
 */
export function getLatestPosts(limit = 5) {
  return request({
    url: "/public/latest-posts",
    method: "get",
    params: { limit },
  });
}
